<template>
    <div>
        <div class="container_box">
            <el-button type="primary"
                       @click="$router.go(-1)">返回</el-button>
            
        </div>
        <div class="padding_box">
            <div class="container_box">
                <div class="order_title">课后反馈信息</div>
                <el-divider></el-divider>
                <!-- <div class="page-title order-title">店铺信息</div> -->
                <t-table>
                    <t-tr>
						 <t-td>学校名称</t-td>
                        <t-td>课程名称</t-td>
                        <t-td>课程分类</t-td>
                        <t-td>提交时间</t-td>
                    </t-tr>
                    <t-tr>
						  <t-td>{{arr.schoolName}}</t-td>
                        <t-td>{{arr.productName}}</t-td>
                        <t-td>{{arr.categoryName}}</t-td>
                      
                        <t-td>{{arr.addTime}}</t-td>
                    </t-tr>
                
                </t-table>
            </div>
            <div class="container_box">
                <div class="page-title order-title">课后反馈</div>
                <el-image v-for="(item1,index1) in afterWorkPic"
                          :key="index1"
                          style="margin-top:15px"
                          class="merchant-img"
                          fit="cover"
                          :src="item1"
                          :preview-src-list="beforeClassPic">
                </el-image>
				<div class="page-title order-title">反馈内容</div>
				<div id="" style="border: 1px solid #cccccc;font-size: 14px;border-radius: 10px;min-height: 100px;line-height: 35px;padding: 20px;color: #999999;">
					{{arr.afterWorkRemake}}
				</div>
			<!-- 	<el-input style="margin-top:15px"
				          type="textarea"
				          disabled="false"
				          :rows="3"
				          placeholder="备注"
				          v-model="arr.afterWorkRemake">
				</el-input> -->
				<div class="page-title order-title">作业布置</div>
				<el-image v-for="(item1,index1) in taskPic"
				          :key="index1"
				          style="margin-top:15px"
				          class="merchant-img"
				          fit="cover"
				          :src="item1"
				          :preview-src-list="afterClassPic">
				</el-image>
			<div class="page-title order-title">作业内容</div>
			<div id="" style="border: 1px solid #cccccc;font-size: 14px;border-radius: 10px;min-height: 100px;line-height: 35px;padding: 20px;color: #999999;">
				{{arr.taskComment}}
			</div>
		
            </div>

        </div>
  
    </div>
</template>

<script>
import axios from '@/utils/axios.js';
import { Loading } from 'element-ui';
import businessCard from '@/components/business-card/business-card.vue';
import tTable from '@/components/t-table/t-table.vue';
import tTh from '@/components/t-table/t-td.vue';
import tTr from '@/components/t-table/t-tr.vue';
import tTd from '@/components/t-table/t-td.vue';
export default {
    components: {
        tTable,
        tTh,
        tTr,
        tTd,
        businessCard
    },
    data: function () {
        return {
			taskPic:[],
			afterWorkPic:[],
			arr:{},
			qname:[],
			qtel:[],
			afterClassPic:[],
			beforeClassPic:[],
			checkWork:[],
            // 同意 || 拒绝确认弹框
            dialogVisible: false,
            editData: {
                id: '',
                auditStatus: ''
            },
            merchantDetailData: {

            },
        };
    },
    filters: {
        auditStatusFilter(status) {
            switch (status) {
                case 0:
                    return '待审核'
                case 1:
                    return '已拒绝'
                case 2:
                    return '审核通过'
            }
        },
        auditTypeFilter(status) {
            switch (status) {
                case 0:
                    return 'color: #FDAA33'
                case 1:
                    return 'color: #FA5555'
                case 2:
                    return 'color: #67C23A'

            }
        },
    },
    methods: {
        showDialog(id, type) {
            this.editData.id = id
            this.editData.auditStatus = type
            this.dialogVisible = true
        },
        // 同意或拒绝
        agreeOrRefuse() {
            axios({
                url: '/api-admin/recruitmentApply/audit',
                method: 'POST',
                data: this.editData,
            }).then(result => {
                if (result.resp_code == 0) {
                    this.$message.success(result.resp_msg);
                    this.dialogVisible = false;
                    this.getTableData();
                } else {
                    this.$message.error(result.resp_msg);
                    this.dialogVisible = false;
                }
            });
        },
        getData() {
            axios({
                url: "/api-admin/recruitmentApply/" + this.$route.query.id,
                method: "get",
            }).then(result => {
                const { data } = result;
                data.facadeImg = data.facadeImg.split(',')
                data.storeEnvironmentImg = data.storeEnvironmentImg.split(',')
                this.merchantDetailData = data
            })

        },

    },
    activated() {

    },
    created() {
		console.log("att",this.$route.query.arr)
		this.arr = JSON.parse(this.$route.query.arr);
	
		this.afterWorkPic=this.arr.afterWorkPic.split(',')
		this.taskPic=this.arr.taskPic.split(',')
	
    }

};
</script>
<style lang="scss" scoped>
.merchant_box {
    margin-top: 25px;
    .merchant_logo {
        width: 120px;
        height: 120px;
        border-radius: 8px;
        margin-right: 25px;
    }
    .item_box {
        height: 80px;
        margin-top: 20px;
        justify-content: space-around;
    }
    .title {
        font-size: 16px;
        color: #999;
    }
    .title2 {
        color: #333;
        font-weight: bold;
    }
}
.t-table {
    margin: 15px 0 20px 0;
}
.merchant-img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    margin: 0 24px 24px 0;
}
.page-title::before {
    height: 20px;
}
.order-title {
    margin: 10px 0;
    font-size: 14px;
    color: #333;
}
.xList{
	display: flex;
	flex-wrap: wrap;
	.xbox{
		padding:10px 15px;
		border-radius: 10px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		margin: 10px;
		.xbox-name{
			font-size: 18px;
		}
		.xbox-tel{
			font-size: 14px;
		}
	}
	.xchecked{
		background-color: #63b9f2;
		color: #ffffff;
	}
	.xno{
		background-color: #f5f5f5;
		color: #333333;
		
	}
}
</style>
<style lang="scss">
</style>